//
//  CellofEdit.m
//  project-A (pianke)
//
//  Created by dllo on 16/3/5.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "CellofEdit.h"

@implementation CellofEdit

-(void)dealloc{
    [_viewline release];
    
    [_name release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creaview];
    }
    return self;
}
-(void)creaview{
    
    
    self.name = [[UILabel alloc]init];
    [self.contentView addSubview:self.name];
    self.name.font = [UIFont fontWithName:@"ArialMT" size:19];
    [self.name release];
    
    self.viewline = [[UIView alloc]init];
    [self.contentView addSubview:self.viewline];
    self.viewline.backgroundColor = [UIColor lightGrayColor];
    [self.viewline release];
    
}

-(void)layoutSubviews{
    CGFloat width = self.contentView.frame.size.width;
    
    CGFloat height = self.contentView.frame.size.height;
    
    self.name.frame = CGRectMake(0, 15, 0.2 * width, height - 30);
    self.viewline.frame = CGRectMake(20, height - 1, width - 40, 1);

}

- (void)awakeFromNib {
    // Initialization cod
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
